package org.elanfox.intellicommunity.common.constant;

/**
 * @author allan
 * @version 1.0.0
 * @date 2019/12/19
 */
public class RedisConstant {
    public static final String KEY_LAST_NODE_MSG = "ic:msg:node:node";
    public static final String KEY_LAST_LOCATION_MSG = "ic:msg:node:location";
    public static final String KEY_LAST_LOCATION_MSG_BY_MAP = "ic:msg:node:location:map";
    public static final String KEY_LAST_ALARM_MSG = "ic:msg:node:alarm";
    public static final String KEY_CMD = "ic:cmd:";
    public static final String KEY_STEWARD = "ic:msg:stewards";

    public static String getKeyCmd(String hexAddr) {
        return KEY_CMD + hexAddr;
    }


    public static final String KEY_HEARTBEAT = "ic:cmd:heartbeat:";

    public static final String KEY_LOCATOR_HEARTBEAT = "ic:cmd:heartbeat:locator:";


    //房间缓存
    public static final String KEY_ROOM = "info:room";
    //用户卡缓存
    public static final String KEY_CARD = "info:card";
    //用户缓存
    public static final String KEY_USER = "info:user";

    public static final String KEY_LOCATION_STRUCTURE = "ic:msg:location:structure:";

    public static String getKeyLocationStructure(Integer structure) {
        return KEY_LOCATION_STRUCTURE + structure;
    }
}
